home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / goobers.swf / scripts / frame_92 / PlaceObject2_43_44 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2007-03-28  |  553 b   |  31 lines

  1. onClipEvent(enterFrame){
  2.    if(_parent.player.status == "play" || _parent.player.status == "hit")
  3.    {
  4.       frame++;
  5.       if(frame % num_frames_x == 0)
  6.       {
  7.          x += velx;
  8.       }
  9.       if(frame % num_frames_y == 0)
  10.       {
  11.          y += vely;
  12.       }
  13.       if(right < x)
  14.       {
  15.          x = right;
  16.          velx *= -1;
  17.       }
  18.       else if(x < left)
  19.       {
  20.          x = left;
  21.          velx *= -1;
  22.       }
  23.       if(bottom < y)
  24.       {
  25.          y = start_y;
  26.       }
  27.       this._x = x;
  28.       this._y = y;
  29.    }
  30. }
  31.